package main

import (
  "github.com/cloudwego/hertz/pkg/app/server"
  "go-llm-proxy/handlers"
)

func main() {
  h := server.Default()
  h.GET("/", handlers.PingCompletions)
  h.GET("/ping", handlers.PingCompletions)
  h.POST("/test", handlers.Test)
  h.GET("/v1/models", handlers.OpenAiModels)
  h.POST("/v1/chat/completions", handlers.OpenAiV1ChatCompletions)
  h.GET("/openai/v1/models", handlers.OpenAiModels)
  h.POST("/openai/v1/chat/completions", handlers.OpenAiV1ChatCompletions)

  h.GET("/perplexity/models", handlers.PerplexityModels)
  h.POST("/perplexity/chat/completions", handlers.PerplexityChatCompletions)
  h.GET("/perplexity/v1/models", handlers.PerplexityModels)
  h.POST("/perplexity/v1/chat/completions", handlers.PerplexityChatCompletions)

  h.Spin()
}
